package com.heyu.cgsd.util;

public class VolumeConvertUtils {
    private static final int M3 = 0;
    private static final int DM3 = 1;
    private static final int CM3 = 2;
    private static final int MM3 = 3;
    private static final int HL = 4;
    private static final int L = 5;
    private static final int DL = 6;
    private static final int CL = 7;
    private static final int ML = 8;
    private static final int FT3 = 9;
    private static final int IN3 = 10;
    private static final int YD3 = 11;
    private static final int AF3 = 12;

    private static double[] c = {1, 0.001, 0.000001, 0.000000001, 0.1, 0.001, 0.0001, 0.00001,
            0.000001, 0.0283168466, 0.261521154, 12201.531, 19693406};

    public static double convert(double input, int srcUnit, int desUnit) {
        double result = input * c[srcUnit];

        return result / c[desUnit];
    }

}
